home *** CD-ROM | disk | FTP | other *** search
- fsm StockCaptureBase : integer;
-
- const
- #include_ <content\ABLScripts\mwconst.abi>
-
- type
- #include_ <content\ABLScripts\mwtype.abi>
-
- var
- static ObjectID baseBuilding1;
- static ObjectID baseBuilding2;
- static ObjectID baseBuilding3;
- static ObjectID baseBuilding4;
- static ObjectID baseBuilding5;
- static ObjectID baseBuilding6;
- static ObjectID baseBuilding7;
- static ObjectID baseBuilding8;
-
- function CheckIfBuildingDestroyed(ObjectID building, integer team) : integer;
- code
- if (building <> -1) then
- if (IsDead(building)) then
- Destroy(TeamObjectID(team));
- return (1);
- endif;
- endif;
-
- return (0);
- endfunction;
-
- function init;
- code
- baseBuilding1 = -1;
- baseBuilding2 = -1;
- baseBuilding3 = -1;
- baseBuilding4 = -1;
- baseBuilding5 = -1;
- baseBuilding6 = -1;
- baseBuilding7 = -1;
- baseBuilding8 = -1;
-
- SetupScoring_CaptureBase;
- endfunction;
-
- state startState;
- code
-
- CheckIfBuildingDestroyed(baseBuilding1,1);
- CheckIfBuildingDestroyed(baseBuilding2,2);
- CheckIfBuildingDestroyed(baseBuilding3,3);
- CheckIfBuildingDestroyed(baseBuilding4,4);
- CheckIfBuildingDestroyed(baseBuilding5,5);
- CheckIfBuildingDestroyed(baseBuilding6,6);
- CheckIfBuildingDestroyed(baseBuilding7,7);
- CheckIfBuildingDestroyed(baseBuilding8,8);
-
- endstate;
-
- state deadState;
- code
-
- endstate;
-
- endfsm.
-
-